#define _CRT_SECURE_NO_WARNINGS 1
bool IsPopOrder(vector<int>& pushV, vector<int>& popV) {
    stack<int> st;
    int i = 0;
    for (auto e : pushV) {
        st.push(e);
        while (!st.empty() && st.top() == popV[i]) {
            i++;
            st.pop();
        }
    }
    return st.empty();
}
};